"""Main entry point for Skype Shell.

Copyright Ian Blumel, 2009.
All Rights Reserved.
"""

try:
    import psyco
    psyco.profile()
except ImportError:
    pass # Ok, we tried.

import sys

# Check for Skype4Py
try:
    import Skype4Py
except ImportError:
    print >>sys.stderr, ("Require Skype4Py to run.\nVisit "
                         "http://skype4py.sourceforge.net/ for more details.")
    sys.exit(-1)

from libskysh.skype_kernal import skype_kernal_t
                            
if __name__=="__main__":
    kern = skype_kernal_t()
    print "loading builtins...",
    kern.load_builtins()
    print "OK."

    print "attaching...",
    kern.start()
    print "OK."

    # Poll...
    cmd = ""
    while not cmd in ['x', 'X']:
        cmd = raw_input("type x to quit: \n")      
    
    kern.stop()
